import request from '/@/utils/request';
//新增
export async function postNumber(params?: object) {
	return await request({
		url: '/serial/post',
		method: 'post',
		data: params,
	});
}
//编辑
export async function putNumber(params?: object) {
	return await request({
		url: '/serial/put',
		method: 'put',
		data: params,
	});
}
//保存
export async function saveNumber(params: any) {
	if (params.id && params.id > 0) {
		return await putNumber(params);
	} else {
		return await postNumber(params);
	}
}
//查询
export async function queryNumber(params) {
	return await request({
		url: '/serial/query',
		params,
		method: 'get',
	});
}
//删除
export async function deleteNumber(params: any) {
	return await request({
		url: '/serial/delete',
		method: 'delete',
		data: params,
	});
}
